The blanks a filled in below. Each button must have a unique command, but it could be something other than the ones here.
actionPerformed()
We need to add some logic so that
a different action is performed for each button.
An ActionEvent
object contains its button's command.
To get it, use the getActionCommand()
method.
For example, if evt
refers to an ActionEvent
,
then evt.getActionCommand()
returns the command.
Since the command is a string, use equals( String )
to compare the command to another string.
Fill in the blanks in the program.